<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:p="http://primefaces.org/ui">

    <h:form id="PyfntbejegastoListForm">

        <p:panel header="#{myBundle.ListPyfntbejegastoTitle}">

            <p:dataTable id="datalist" value="#{pyfntbejegastoController.items}" var="item"
                         selectionMode="single" selection="#{pyfntbejegastoController.selected}"
                         rowKey="#{item.pyfntbejegastoid}"
                         paginator="true"
                         rows="5"
                         rowsPerPageTemplate="5,10,20,30"
                         >

                <p:ajax event="rowSelect"   update="createButton viewButton editButton deleteButton"/>
                <p:ajax event="rowUnselect" update="createButton viewButton editButton deleteButton"/>

                <p:column sortBy="#{item.pyfntbejegastoid}" filterBy="#{item.pyfntbejegastoid}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListPyfntbejegastoTitle_pyfntbejegastoid}"/>
                    </f:facet>
                    <h:outputText value="#{item.pyfntbejegastoid}"/>
                </p:column>
                <p:column sortBy="#{item.asignado}" filterBy="#{item.asignado}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListPyfntbejegastoTitle_asignado}"/>
                    </f:facet>
                    <h:outputText value="#{item.asignado}"/>
                </p:column>
                <p:column sortBy="#{item.modificado}" filterBy="#{item.modificado}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListPyfntbejegastoTitle_modificado}"/>
                    </f:facet>
                    <h:outputText value="#{item.modificado}"/>
                </p:column>
                <p:column sortBy="#{item.vigente}" filterBy="#{item.vigente}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListPyfntbejegastoTitle_vigente}"/>
                    </f:facet>
                    <h:outputText value="#{item.vigente}"/>
                </p:column>
                <p:column sortBy="#{item.montocertif}" filterBy="#{item.montocertif}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListPyfntbejegastoTitle_montocertif}"/>
                    </f:facet>
                    <h:outputText value="#{item.montocertif}"/>
                </p:column>
                <p:column sortBy="#{item.comprometido}" filterBy="#{item.comprometido}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListPyfntbejegastoTitle_comprometido}"/>
                    </f:facet>
                    <h:outputText value="#{item.comprometido}"/>
                </p:column>
                <p:column sortBy="#{item.devengado}" filterBy="#{item.devengado}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListPyfntbejegastoTitle_devengado}"/>
                    </f:facet>
                    <h:outputText value="#{item.devengado}"/>
                </p:column>
                <p:column sortBy="#{item.pagado}" filterBy="#{item.pagado}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListPyfntbejegastoTitle_pagado}"/>
                    </f:facet>
                    <h:outputText value="#{item.pagado}"/>
                </p:column>
                <p:column sortBy="#{item.fechacorte}" filterBy="#{item.fechacorte}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListPyfntbejegastoTitle_fechacorte}"/>
                    </f:facet>
                    <h:outputText value="#{item.fechacorte}">
                        <f:convertDateTime pattern="MM/dd/yyyy HH:mm:ss" />
                    </h:outputText>
                </p:column>
                <p:column sortBy="#{item.observaciones}" filterBy="#{item.observaciones}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListPyfntbejegastoTitle_observaciones}"/>
                    </f:facet>
                    <h:outputText value="#{item.observaciones}"/>
                </p:column>
                <p:column sortBy="#{item.pyfntbpoaprogid.pyfntbpoaprogid}" filterBy="#{item.pyfntbpoaprogid.pyfntbpoaprogid}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListPyfntbejegastoTitle_pyfntbpoaprogid}"/>
                    </f:facet>
                    <h:outputText value="#{item.pyfntbpoaprogid.pyfntbpoaprogid}"/>
                </p:column>
                <p:column sortBy="#{item.pyfntbpartidaid.descripcion}" filterBy="#{item.pyfntbpartidaid.descripcion}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListPyfntbejegastoTitle_pyfntbpartidaid}"/>
                    </f:facet>
                    <h:outputText value="#{item.pyfntbpartidaid.descripcion}"/>
                </p:column>
                <f:facet name="footer">
                    <p:commandButton id="createButton" icon="ui-icon-plus"   value="#{myBundle.Create}" actionListener="#{pyfntbejegastoController.prepareCreate}" update=":PyfntbejegastoCreateForm" oncomplete="PyfntbejegastoCreateDialog.show()"/>
                    <p:commandButton id="viewButton"   icon="ui-icon-search" value="#{myBundle.View}" update=":PyfntbejegastoViewForm" oncomplete="PyfntbejegastoViewDialog.show()" disabled="#{empty pyfntbejegastoController.selected}"/>
                    <p:commandButton id="editButton"   icon="ui-icon-pencil" value="#{myBundle.Edit}" update=":PyfntbejegastoEditForm" oncomplete="PyfntbejegastoEditDialog.show()" disabled="#{empty pyfntbejegastoController.selected}"/>
                    <p:commandButton id="deleteButton" icon="ui-icon-trash"  value="#{myBundle.Delete}" actionListener="#{pyfntbejegastoController.delete}" update=":growl,datalist" disabled="#{empty pyfntbejegastoController.selected}"/>
                </f:facet>

            </p:dataTable>

        </p:panel>

    </h:form>

</ui:composition>